package com.education.welco.service.impl;

import java.util.List;

import com.education.common.utils.Convert;
import com.education.welco.mapper.SCatalogClassEndMapper;
import com.education.welco.pojo.SCatalogClassEnd;
import com.education.welco.service.ISCatalogClassEndService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 课程班级完结 服务层实现
 *
 * @author d
 * @date 2020-05-15
 */
@Service
public class SCatalogClassEndServiceImpl implements ISCatalogClassEndService {

    @Autowired
    private SCatalogClassEndMapper sCatalogClassEndMapper;

    /**
     * 查询课程班级完结信息
     *
     * @param id 课程班级完结ID
     * @return 课程班级完结信息
     */
    @Override
    public SCatalogClassEnd selectSCatalogClassEndById(Integer id) {
        return sCatalogClassEndMapper.selectSCatalogClassEndById(id);
    }

    /**
     * 查询课程班级完结列表
     *
     * @param sCatalogClassEnd 课程班级完结信息
     * @return 课程班级完结集合
     */
    @Override
    public List<SCatalogClassEnd> selectSCatalogClassEndList(SCatalogClassEnd sCatalogClassEnd) {
        return sCatalogClassEndMapper.selectSCatalogClassEndList(sCatalogClassEnd);
    }

    /**
     * 新增课程班级完结
     *
     * @param sCatalogClassEnd 课程班级完结信息
     * @return 结果
     */
    @Override
    public int insertSCatalogClassEnd(SCatalogClassEnd sCatalogClassEnd) {
        return sCatalogClassEndMapper.insertSCatalogClassEnd(sCatalogClassEnd);
    }

    /**
     * 删除课程班级完结
     *
     * @param catalogId 课程班级完结ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogClassEndByCatalogId(Integer catalogId) {
        return sCatalogClassEndMapper.deleteSCatalogClassEndByCatalogId(catalogId);
    }

    /**
     * 修改课程班级完结
     *
     * @param sCatalogClassEnd 课程班级完结信息
     * @return 结果
     */
    @Override
    public int updateSCatalogClassEnd(SCatalogClassEnd sCatalogClassEnd) {
        return sCatalogClassEndMapper.updateSCatalogClassEnd(sCatalogClassEnd);
    }

    /**
     * 删除课程班级完结对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogClassEndByIds(String ids) {
        return sCatalogClassEndMapper.deleteSCatalogClassEndByIds(Convert.toStrArray(ids));
    }
}